<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Sugar</title>
  </head>

  <body>
    <script>
      const obj = {
        email: 'sisili@qq.com',
        nickname: '李思思',
        password: '123456',
        userPic: 'http://localhost:8080/icon.jpg',
        username: 'admin',
      }
      // 对象也可以通过 for in 循环遍历
      //  1. 键名称   key
      //  2. 获取值   obj[key]
      for (let key in obj) {
        if (key !== 'userPic') {
          console.log('键名称', key)
          console.log('获取值', obj[key])
        }
      }
    </script>
  </body>
</html>
